package com.dream.dreamweb.bean;

import com.dream.dreamweb.errorcode.WebErrorCode;
import lombok.Data;

/**
 * @author ：tiger.
 * @date ：2021/9/30 17:36
 */
@Data
public class Response<T> {

	private String errorCode = WebErrorCode.SUCCESS.getErrorCode();

	private String errorMsg = WebErrorCode.SUCCESS.getErrorMsg();

	private T data;

	public Response() {
	}

	public Response(T data) {
		this.data = data;
	}


	public static Response<?> success() {
		return new Response<>();
	}

	public static <T> Response<T> success(T data) {
		return new Response<>(data);
	}


}
